// import { Injectable, NotFoundException, PipeTransform } from '@nestjs/common';
// import { User } from '../entities/user.entity';
// import { UserService } from '../user.service';

// @Injectable()
// export class UserById implements PipeTransform<string, Promise<User>> {
//   constructor(private readonly service: UserService) {}
//   async transform(value: string): Promise<User> {
//     const result = await this.service.findOne(value);
//     if (!result) {
//       throw new NotFoundException('用户账号不存在！');
//     }
//     return result;
//   }
// }
